/**
 * 收藏
 */
import request from "../request.js";
import url from "../../url/url.js";
export default {
    /**
     * 获取收藏素材列表 
     */
    getCollectPage(data) {
        return request({
            url: url.baseUrl + "/collect/page?pageSize=" + data.pageSize + "&pageNum=" + data.pageNum,
            data: { userId: data.userId },
            method: "post"
        });
    },
    /**
     * 视频详细
     * @param {*} data   video/{videoId}
     * @returns 
     */
    getVideoDetailed(data) {
        return request({
            url: url.baseUrl + "/video/get/" + data.videoId,
            method: "get"
        });
    },
    /**
     * 获取收藏创始人列表 
     */
    getCollectUserPage(data) {
        return request({
            url: url.baseUrl + "/collectUser/page?pageSize=" + data.pageSize + "&pageNum=" + data.pageNum,
            data: { userId: data.userId },
            method: "post"
        });
    },
    /**
     * 素材收藏  
     */
    collectSave(data) {
        return request({
            url: url.baseUrl + "/collect/save",
            data: data,
            method: "put"
        });
    },
    /**
     * 收藏素材删除 
     */
    collectDetele(data) {
        return request({
            url: url.baseUrl + "/collect/delete",
            data: data,
            method: "post"
        });
    },
    /**
     * 创造人收藏 /collectUser/save
     */
    collectUserSave(data) {
        return request({
            url: url.baseUrl + "/collectUser/save",
            data: data,
            method: "put"
        });
    },
    /**
     * 创始人收藏删除 /collectUser/delete
     */
    collectUserDetele(data) {
        return request({
            url: url.baseUrl + "/collectUser/delete",
            data: data,
            method: "post"
        });
    },
}